
var arr=[];
var arr1=[];
var  tl;
var tl1;
var arrEle=[];
// var hourNow='';
var dataNow=[];
//实际能量数组
var index=0;
var index1=0;
var sumOther1=0;
var sumOther2=0;
var sumBangong1=0;
var sumBangong2=0;
var sumZhaoming1=0;
var sumZhaoming2=0;
var sumNuantong1=0;
var sumNuantong2=0;
var sumXiaofang1=0;
var sumXiaofang2=0;
var sumDianliang1=0;
var sumGuangfu1=0;
var sumGuangfu2=0;
var sumXuneng1=0;
var sumRebeng1=0;
var sumDimaiguan1=0;
var sumAir1=0;
var sumDianliang2=0;
var sumDianneng1=0;
var sumNuandian1=0;
var sumZhujixuneng1=0;
var sumXuqiuW1=0;
var sumXuqiuW2=0;
var sumXuqiuS1=0;
var sumXuqiuS2=0;
var sumMeet1=0;
var sumMeet2=0;
var sumRes1=0;
var sumRes2=0;

var ele=[];

var myChart= echarts.init(document.getElementById('lineChart'));
var myChart2= echarts.init(document.getElementById('lineChart2'));
var myChart3= echarts.init(document.getElementById('lineChart3'));
var myChart4= echarts.init(document.getElementById('lineChart4'));
function loadRightChart(){
    // if (myChart2 != null && myChart2 != "" && myChart2 != undefined) {
    //     myChart2.dispose();
    // }
    // var bangong=window.localStorage.getItem("xuqiu");
    // var bangongValue=bangong.split(",");
    // var bangongData=[];
    // for(var i=0;i<bangongValue.length;i++){
    //     bangongData.push(Number(bangongValue[i]));
    // }
    var bangong=window.localStorage.getItem("xuqiu");
    var bangongValue=bangong.split(",");
    var bangongData=[];
    for(var i=0;i<bangongValue.length;i++){
        bangongData.push(Number(bangongValue[i]).toFixed(1));
    }
    var length=option3.options.length;
    // console.log(option1.options);
    for(var j=0;j<length;j++){
        option3.options[j].series[0].data=bangongData.slice(0,j+1);
    }
    // option3.series[0].data=bangongData;
    myChart2= echarts.init(document.getElementById('lineChart2'));
    // option3.series[0].data=bangongData;
    myChart2.setOption(option3);
}
function loadRightChart1(){
    // if (myChart3 != null && myChart3 != "" && myChart3 != undefined) {
    //     myChart3.dispose();
    // }
    // var meet=window.localStorage.getItem("meet");
    // var meetValue=meet.split(",");
    // var meetData=[];
    // for(var i=0;i<meetValue.length;i++){
    //     meetData.push(Number(meetValue[i]));
    // }
    var meet=window.localStorage.getItem("meet");
    var meetValue=meet.split(",");
    var meetData=[];
    for(var i=0;i<meetValue.length;i++){
        meetData.push(Number(meetValue[i]).toFixed(1));
    }
    var length=option4.options.length;
    for(var j=0;j<length;j++){
        option4.options[j].series[0].data=meetData.slice(0,j+1);
    }
    myChart3= echarts.init(document.getElementById('lineChart3'));
    myChart3.setOption(option4);

}

function loadRightChart2(){
    // if (myChart4 != null && myChart4 != "" && myChart4 != undefined) {
    //     myChart4.dispose();
    // }
    // var res=window.localStorage.getItem("res");
    // var resValue=res.split(",");
    // var resData=[];
    // for(var i=0;i<resValue.length;i++){
    //     resData.push(Number(resValue[i]));
    // }
    var res=window.localStorage.getItem("res");
    var resValue=res.split(",");
    var resData=[];
    for(var i=0;i<resValue.length;i++){
        resData.push(Number(resValue[i]).toFixed(1));
    }
    var length=option5.options.length;
    for(var j=0;j<length;j++){
        option5.options[j].series[0].data=resData.slice(0,j+1);
    }
    myChart4= echarts.init(document.getElementById('lineChart4'));
    myChart4.setOption(option5);

}


function loadChart(){
    // if (myChart != null && myChart != "" && myChart != undefined) {
    //     myChart.dispose();
    // }
    // $.ajax({
    //     type: "POST",
    //     dataType: "json",
    //     url: "/multipower/strategy/getHourData",
    //     success: function(result) {
    //         console.log("热量数据");
    //         arrEle=result.dls;
    //         for(var i=0;i<arrEle.length;i++){
    //             ele.push(arrEle[i]*0.88);
    //         }
    //         myChart= echarts.init(document.getElementById('lineChart'));
    //         option1.series[0].data=arrEle;
    //         myChart.setOption(option1);
    //     },
    // })
    var max=0;
    var dls=window.localStorage.getItem("nlsValue");
    var dlsArr=dls.split(",");
    for(var i=0;i<dlsArr.length;i++){
        if(Number(dlsArr[i])>max){
            max=Number(dlsArr[i]);
        }
        ele.push((Number(dlsArr[i])*0.88).toFixed(1));//实际
        arrEle.push(Number(dlsArr[i]));//预测
    }
    option1.baseOption.yAxis.max=Number(max+50).toFixed(0);
    console.log("max="+max);
    console.log(typeof max);
    var length=option1.options.length;
    option1.options[0].series[1].data=arrEle;
    for(var index=0;index<length;index++){
        option1.options[index].yAxis.max=Number(max+50).toFixed(0);
        console.log(option1.options[index].yAxis.max);
    }
    for(var j=0;j<length;j++){
        option1.options[j].series[0].data=ele.slice(0,j+1);
    }
    myChart= echarts.init(document.getElementById('lineChart'));
   myChart.setOption(option1);
    // myChart= echarts.init(document.getElementById('lineChart'));
    // myChart.setOption(option1);
    // console.log("option1设置成功");
}
// function loadChart1(){
//     if (myChart != null && myChart != "" && myChart != undefined) {
//         myChart.dispose();
//     }
//     mychart= echarts.init(document.getElementById('lineChart'));
//     mychart.setOption(option2);
// }
var option3 = {
    baseOption: {
        timeline: {
            loop: false,
            axisType: 'category',
            show: false,
            autoPlay: false,
            playInterval: 1000,
            data: ['00:00', '01:00', '02:00','03:00','04:00','05:00',
                '06:00', '07:00', '08:00','09:00','10:00','11:00',
                '12:00', '13:00', '14:00','15:00','16:00','17:00',
                '18:00', '19:00', '20:00','21:00','22:00','23:00',]
        },
        grid: {
            top: '20%',   // 等价于 y: '16%'
            left: '3%',
            right: '8%',
            bottom: '10%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            name: '时间',
            axisLabel: {
                show: false,
            },
            axisLine: {
                lineStyle: {
                    // 设置y轴颜色
                    color: '#fff'
                }
            },
        }, ],
        yAxis: { type: 'value', name: 'kWh' ,
             min:0,
             max:1100,
            splitNumber:2,  // 设置y轴刻度间隔个数
            axisLine: {
                lineStyle: {
                    // 设置y轴颜色
                    color: '#fff'
                }
            },
            axisLabel: {
                fontSize:10,
            },
            splitLine:
                {show: true},
        },
        series: [
            {name:'办公区域',type:'line'},
            // {
            //     name: 'GDP占比',
            //     type: 'pie',
            //     // center: ['75%', '35%'],
            //     // radius: '28%'
            // }
            // {
            //     // type: 'line',
            //
            //     name: 'GDP占比',
            //     type: 'pie',
            //     center: ['75%', '35%'],
            //     radius: '28%'
            //
            // },
        ],
        color: ['#e77980'],
        tooltip: {trigger: 'axis'}
    },
    //变量则写在options中
    options:[
        {

            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                // axisLabel: {
                //     show: false,
                // },
                // axisLabel: {
                //     rotate: 0, // 旋转角度
                //     interval: 1  //设置X轴数据间隔几个显示一个，为0表示都显示
                // },
                boundaryGap: false,
            }],
            // title: {
            //     text: '能量预测与实际对比',
            //     // subtext: '单位:Mwh'
            // },
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,  // 设置y轴刻度间隔个数
                axisLine: {
                    lineStyle: {
                        // 设置y轴颜色
                        color: '#fff'
                    }
                },
                axisLabel: {
                    fontSize:10,
                },
                splitLine:
                    {show: true},
            }],
            series: [
                {
                    data: [],
                    smooth: 0.5,
                    symbol:'none',
                    itemStyle:{
                        normal:{
                            // 拐点上显示数值
                            label : {
                                show: false
                            },
                            // borderColor:'red',  // 拐点边框颜色
                            lineStyle:{
                                width:2,  // 设置线宽
                                type:'solid'  //'dotted'虚线 'solid'实线
                            }
                        }
                    }
                },
            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],

            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },
            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        }, {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],

            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        }, {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:1100,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
    ]
};
var option4 = {
    baseOption: {
        timeline: {
            loop: false,
            axisType: 'category',
            show: false,
            autoPlay: false,
            playInterval: 1000,
            data: ['00:00', '01:00', '02:00','03:00','04:00','05:00',
                '06:00', '07:00', '08:00','09:00','10:00','11:00',
                '12:00', '13:00', '14:00','15:00','16:00','17:00',
                '18:00', '19:00', '20:00','21:00','22:00','23:00',]
        },
        grid: {
            top: '20%',   // 等价于 y: '16%'
            left: '3%',
            right: '8%',
            bottom: '10%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            name: '时间',
            axisLabel: {
                show: false,
            },
            axisLine: {
                lineStyle: {
                    // 设置y轴颜色
                    color: '#fff'
                }
            },
        }, ],
        yAxis: { type: 'value', name: 'kWh' ,
            min:0,
            max:110,
            splitNumber:2,  // 设置y轴刻度间隔个数
            axisLine: {
                lineStyle: {
                    // 设置y轴颜色
                    color: '#fff'
                }
            },
            axisLabel: {
                fontSize:10,
            },
            splitLine:
                {show: true},
        },
        series: [
            {name:'会议室',type:'line'},
            // {
            //     name: 'GDP占比',
            //     type: 'pie',
            //     // center: ['75%', '35%'],
            //     // radius: '28%'
            // }
            // {
            //     // type: 'line',
            //
            //     name: 'GDP占比',
            //     type: 'pie',
            //     center: ['75%', '35%'],
            //     radius: '28%'
            //
            // },
        ],
        color: ['#e77980'],
        tooltip: {trigger: 'axis'}
    },
    //变量则写在options中
    options:[
        {

            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
                boundaryGap: false,

            }],
            // title: {
            //     text: '能量预测与实际对比',
            //     // subtext: '单位:Mwh'
            // },
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,  // 设置y轴刻度间隔个数
                axisLine: {
                    lineStyle: {
                        // 设置y轴颜色
                        color: '#fff'
                    }
                },
                axisLabel: {
                    fontSize:10,
                },
                splitLine:
                    {show: true},
            }],
            series: [
                {
                    data: [],
                    smooth: 0.5,
                    symbol:'none',
                    itemStyle:{
                        normal:{
                            // 拐点上显示数值
                            label : {
                                show: false
                            },
                            // borderColor:'red',  // 拐点边框颜色
                            lineStyle:{
                                width:2,  // 设置线宽
                                type:'solid'  //'dotted'虚线 'solid'实线
                            }
                        }
                    }
                },
            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],

            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },
            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        }, {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],

            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        }, {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:110,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
    ]
};
var option5 = {
    baseOption: {
        timeline: {
            loop: false,
            axisType: 'category',
            show: false,
            autoPlay: false,
            playInterval: 1000,
            data: ['00:00', '01:00', '02:00','03:00','04:00','05:00',
                '06:00', '07:00', '08:00','09:00','10:00','11:00',
                '12:00', '13:00', '14:00','15:00','16:00','17:00',
                '18:00', '19:00', '20:00','21:00','22:00','23:00',]
        },
        grid: {
            top: '20%',   // 等价于 y: '16%'
            left: '3%',
            right: '8%',
            bottom: '10%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            name: '时间',
            axisLabel: {
                show: false,
            },
            axisLine: {
                lineStyle: {
                    // 设置y轴颜色
                    color: '#fff'
                }
            },
        }, ],
        yAxis: { type: 'value', name: 'kWh' ,
            min:0,
            max:110,
            splitNumber:2,  // 设置y轴刻度间隔个数
            axisLine: {
                lineStyle: {
                    // 设置y轴颜色
                    color: '#fff'
                }
            },
            axisLabel: {
                fontSize:10,
            },
            splitLine:
                {show: true},
        },
        series: [
            {name:'会议室',type:'line'},
            // {
            //     name: 'GDP占比',
            //     type: 'pie',
            //     // center: ['75%', '35%'],
            //     // radius: '28%'
            // }
            // {
            //     // type: 'line',
            //
            //     name: 'GDP占比',
            //     type: 'pie',
            //     center: ['75%', '35%'],
            //     radius: '28%'
            //
            // },
        ],
        color: ['#e77980'],
        tooltip: {trigger: 'axis'}
    },
    //变量则写在options中
    options:[
        {

            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
                boundaryGap: false,

            }],
            // title: {
            //     text: '能量预测与实际对比',
            //     // subtext: '单位:Mwh'
            // },
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,  // 设置y轴刻度间隔个数
                axisLine: {
                    lineStyle: {
                        // 设置y轴颜色
                        color: '#fff'
                    }
                },
                axisLabel: {
                    fontSize:10,
                },
                splitLine:
                    {show: true},
            }],
            series: [
                {
                    data: [],
                    smooth: 0.5,
                    symbol:'none',
                    itemStyle:{
                        normal:{
                            // 拐点上显示数值
                            label : {
                                show: false
                            },
                            // borderColor:'red',  // 拐点边框颜色
                            lineStyle:{
                                width:2,  // 设置线宽
                                type:'solid'  //'dotted'虚线 'solid'实线
                            }
                        }
                    }
                },
            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],

            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },
            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        }, {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],

            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        }, {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    show: false,
                },
            }],
            yAxis: [{
                min:0,
                max:210,
                splitNumber:2,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
    ]
};
var option1 = {
    baseOption: {
        timeline: {
            loop: false,
            axisType: 'category',
            show: false,
            autoPlay: false,
            playInterval: 1000,
            data: ['00:00', '01:00', '02:00','03:00','04:00','05:00',
                '06:00', '07:00', '08:00','09:00','10:00','11:00',
                '12:00', '13:00', '14:00','15:00','16:00','17:00',
                '18:00', '19:00', '20:00','21:00','22:00','23:00',]
        },
        grid: {
            top: '20%',   // 等价于 y: '16%'
            left: '3%',
            right: '8%',
            bottom: '3%',
            containLabel: true
        },
        legend: {
            // orient 设置布局方式，默认水平布局，可选值：'horizontal'（水平） ¦ 'vertical'（垂直）
            orient: 'horizontal',
            // x 设置水平安放位置，默认全图居中，可选值：'center' ¦ 'left' ¦ 'right' ¦ {number}（x坐标，单位px）
            x: 'center',
            // y 设置垂直安放位置，默认全图顶端，可选值：'top' ¦ 'bottom' ¦ 'center' ¦ {number}（y坐标，单位px）
            y: 'top',
            data: ['预测','实际'],
            textStyle: {
                //标题颜色
                color: "#fff"
            },
        },
        xAxis: [{
            type: 'category',
            name: '时间',
            axisLine: {
                lineStyle: {
                    // 设置y轴颜色
                    color: '#fff'
                }
            },
        }, ],
        yAxis: { type: 'value',
            // min:0,
            // max:110,
            splitNumber:6,  // 设置y轴刻度间隔个数
            axisLine: {
                lineStyle: {
                    // 设置y轴颜色
                    color: '#fff'
                }
            },
            axisLabel: {
                fontSize:14,
                fontWeight:500
            },
            splitLine:
                {show: true},
        },
        series: [
            {name:'餐厅',type:'line'},
            // {
            //     name: 'GDP占比',
            //     type: 'pie',
            //     // center: ['75%', '35%'],
            //     // radius: '28%'
            // }
            // {
            //     // type: 'line',
            //
            //     name: 'GDP占比',
            //     type: 'pie',
            //     center: ['75%', '35%'],
            //     radius: '28%'
            //
            // },
        ],
        color: ['#e77980','#31d3eb'],
        tooltip: {trigger: 'axis'}
    },
    //变量则写在options中
    options:[
        {

            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
                axisLabel: {
                    rotate: 0, // 旋转角度
                    interval: 1  //设置X轴数据间隔几个显示一个，为0表示都显示
                },
                boundaryGap: false,
            }],
            // title: {
            //     text: '能量预测与实际对比',
            //     // subtext: '单位:Mwh'
            // },
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
                textStyle: {
                    color: "#fff",
                    fontSize:16,
                    fontWeight:'500'
                },
                padding:[0,0,0,50],
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,  // 设置y轴刻度间隔个数
                axisLine: {
                    lineStyle: {
                        // 设置y轴颜色
                        color: '#fff'
                    }
                },
                axisLabel: {
                    fontSize:12,
                },
                splitLine:
                    {show: true},
            }],
            series: [
                {
                    name:"实际",
                    data: [],
                    smooth: 0.5,
                    symbol: 'none',
                    itemStyle:{
                        normal:{
                            // 拐点上显示数值
                            label : {
                                show: false
                            },
                            // borderColor:'#fff',  // 拐点边框颜色
                            lineStyle:{
                                width:3,  // 设置线宽
                                type:'solid'  //'dotted'虚线 'solid'实线
                            }
                        }
                    }
                },
                {
                    name: '预测',
                    // data:[],
                    data: [820, 932, 301, 1434, 1290, 1330, 1320,
                        810,900,700,1000,1200,1700,
                        1200,900,1300,1400,1500,800,950,
                        890, 1000, 301,500 ],
                    type: 'line',
                    // 设置小圆点消失
                    // 注意：设置symbol: 'none'以后，拐点不存在了，设置拐点上显示数值无效
                    symbol: 'none',
                    // 设置折线弧度，取值：0-1之间
                    smooth: 0.5,
                    itemStyle:{
                        normal:{
                            // 拐点上显示数值
                            label : {
                                show: false
                            },
                            // borderColor:'red',  // 拐点边框颜色
                            lineStyle:{
                                width:2,  // 设置线宽
                                type:'solid'  //'dotted'虚线 'solid'实线
                            }
                        }
                    }
                },
            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                textStyle: {
                    color: "#fff",
                    fontSize:'16',
                    fontWeight:'500'
                },
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },
            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        }, {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],

            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        }, {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
        {
            xAxis: [{
                data: ["00:00","01:00","02:00","03:00","04:00","05:00",
                    "06:00","07:00","08:00","09:00","10:00","11:00",
                    "12:00","13:00","14:00","15:00","16:00","17:00",
                    "18:00","19:00","20:00","21:00","22:00","23:00"],
            }],
            title: {
                text: '能量预测与实际对比',
                // subtext: '单位:kWh'
            },
            yAxis: [{
                // min:0,
                // max:110,
                splitNumber:6,
            }],
            series: [
                {
                    data: []
                },

            ]
        },
    ]
};
var option2 = {

    title: {
        text: '能量预测与实际对比',
        x: 'left' ,
        padding:[0,0,0,50],
        textStyle: {
            color: "#fff",
            fontSize:'16',
            fontWeight:'500'
        },
    },
    animation:true,
    animationDuration:30000,


    legend: {
        // orient 设置布局方式，默认水平布局，可选值：'horizontal'（水平） ¦ 'vertical'（垂直）
        orient: 'horizontal',
        // x 设置水平安放位置，默认全图居中，可选值：'center' ¦ 'left' ¦ 'right' ¦ {number}（x坐标，单位px）
        x: 'center',
        // y 设置垂直安放位置，默认全图顶端，可选值：'top' ¦ 'bottom' ¦ 'center' ¦ {number}（y坐标，单位px）
        y: 'top',
        data: ['预测','实际'],
        textStyle: {
            //标题颜色
            color: "#fff"
        },
    },

    //  图表距边框的距离,可选值：'百分比'¦ {number}（单位px）
    grid: {
        top: '20%',   // 等价于 y: '16%'
        left: '3%',
        right: '8%',
        bottom: '3%',
        containLabel: true
    },

    // 提示框
    tooltip: {
        trigger: 'axis'
    },

    // //工具框，可以选择
    // toolbox: {
    //     feature: {
    //         saveAsImage: {} //下载工具
    //     }
    // },

    xAxis: {
        name: '时间',
        type: 'category',
        axisLine: {
            lineStyle: {
                // 设置x轴颜色
                color: '#fff'
            }
        },
        // 设置X轴数据旋转倾斜
        axisLabel: {
            rotate: 0, // 旋转角度
            interval: 1  //设置X轴数据间隔几个显示一个，为0表示都显示
        },
        // boundaryGap值为false的时候，折线第一个点在y轴上
        boundaryGap: false,
        data:["00:00","01:00","02:00","03:00","04:00","05:00",
            "06:00","07:00","08:00","09:00","10:00","11:00",
            "12:00","13:00","14:00","15:00","16:00","17:00",
            "18:00","19:00","20:00","21:00","22:00","23:00"]
    },

    yAxis: {
        // name: 'KWh',
        type: 'value',
        // min:0, // 设置y轴刻度的最小值
        // max:1800,  // 设置y轴刻度的最大值
        splitNumber:9,  // 设置y轴刻度间隔个数
        axisLine: {
            lineStyle: {
                // 设置y轴颜色
                color: '#fff'
            }
        },
    },

    series: [
        {
            name: '预测',
            data:[],
            // data: [820, 932, 301, 1434, 1290, 1330, 1320,
            //     810,900,700,1000,1200,1700,
            //     1200,900,1300,1400,1500,800,950,
            //     890, 1000, 301,500 ],
            type: 'line',
            // 设置小圆点消失
            // 注意：设置symbol: 'none'以后，拐点不存在了，设置拐点上显示数值无效
            symbol: 'none',
            // 设置折线弧度，取值：0-1之间
            smooth: 0.5,
            itemStyle:{
                normal:{
                    // 拐点上显示数值
                    label : {
                        show: true
                    },
                    borderColor:'red',  // 拐点边框颜色
                    lineStyle:{
                        width:3,  // 设置线宽
                        type:'solid'  //'dotted'虚线 'solid'实线
                    }
                }
            }
        },

        {
            name: '实际',
            data: [],
            // [620, 732, 941, 834, 1690, 1030, 920,
            // 620, 732, 941, 834, 1690, 1030, 920,
            //
            // 620, 732, 941, 834, 1690, 1030, 920,
            // 620, 732, 941],
            type: 'line',
            symbol: 'none',
            smooth: 0.5,
            // 设置折线上圆点大小
            symbolSize:8,
            // itemStyle:{
            //     normal:{
            //         // 拐点上显示数值
            //         label : {
            //             show: true
            //         },
            //         borderColor:'red',  // 拐点边框颜色
            //         lineStyle:{
            //             width:5,  // 设置线宽
            //             type:'solid'  //'dotted'虚线 'solid'实线
            //         }
            //     }
            // }
        },
    ],

    color: ['#31d3eb','#e77980']
};
// myChart=echarts.init(document.getElementById("lineChart"));
// myChart.setOption(option2);
//字符串数组的循环
// function f2(){
//
//     //判断mychart是否存在，存在则销毁。
//     if (myChart != null && myChart != "" && myChart != undefined) {
//         myChart.dispose();
//     }
//     arr1=option2.series[0].data;
//     arr=option2.xAxis.data;
//     console.log(arr);
//     let arr0=arr.shift();
//     let arr10=arr1.shift();
//     arr1.push(arr10);
//     arr.push(arr0);
//     console.log(arr);
//     option2.xAxis.data=arr;
//     option2.series[0].data=arr1;
//     myChart = echarts.init(document.getElementById("lineChart"));
//     myChart.setOption(option2);
// }
//
// function start(){
//     tl=setInterval("f2()",1000);
// }
// function pause(){
//     console.log("开始停止");
//     window.clearInterval(tl);
// }
function draw1()
{
    genDate1();//先绘制一次，否则先调用setinterval会使浏览器有一秒钟的空白
    tl =setInterval("genDate1()",1250);//调用计时器
    //点击开始时同时绘制实际的折线图。
    dataNow=ele;
    console.log(dataNow);
    option2.series[1].data=dataNow;
    option2.series[0].data=arrEle;
    console.log(arrEle);
    if (myChart != null && myChart != "" && myChart != undefined) {
        myChart.dispose();
        console.log("option1删除成功");
    }
    if (myChart2 != null && myChart2 != "" && myChart2 != undefined) {
        myChart2.dispose();
        console.log("option3删除成功");
    }
    if (myChart3 != null && myChart3 != "" && myChart3 != undefined) {
        myChart3.dispose();
        console.log("option3删除成功");
    }
    if (myChart4 != null && myChart4 != "" && myChart4 != undefined) {
        myChart4.dispose();
        console.log("option3删除成功");
    }
    //办公
    var bangong=window.localStorage.getItem("xuqiu");
    var bangongValue=bangong.split(",");
    var bangongData=[];
    for(var i=0;i<bangongValue.length;i++){
        bangongData.push(Number(bangongValue[i]).toFixed(1));
    }
    myChart2= echarts.init(document.getElementById('lineChart2'));
    option3.series[0].data=bangongData;
    myChart2.setOption(option3);
//会议
    var meet=window.localStorage.getItem("meet");
    var meetValue=meet.split(",");
    var meetData=[];
    for(var i=0;i<meetValue.length;i++){
        meetData.push(Number(meetValue[i]).toFixed(1));
    }
    myChart3= echarts.init(document.getElementById('lineChart3'));
    option4.series[0].data=meetData;
    myChart3.setOption(option4);
    //餐厅
    var res=window.localStorage.getItem("res");
    var resValue=res.split(",");
    var resData=[];
    for(var i=0;i<resValue.length;i++){
        resData.push(Number(resValue[i]).toFixed(1));
    }
    myChart4= echarts.init(document.getElementById('lineChart4'));
    option5.series[0].data=resData;
    myChart4.setOption(option5);
    myChart= echarts.init(document.getElementById('lineChart'));
    myChart.setOption(option2);
    // myChart2= echarts.init(document.getElementById('lineChart2'));
    // myChart2.setOption(option3);
    console.log("option2设置成功");
    startScoll();
}

function changeSpanValue(){

    var totalxuNeng=0;
    var totalxuNengvalue=window.localStorage.getItem("zhujixuneng");
    var totalxuNengArr=totalxuNengvalue.split(",");
    for (var i=0;i<totalxuNengArr.length;i++){
      totalxuNeng=totalxuNeng+Number(totalxuNengArr[i]);
    }
    var zhujixunengMY=document.getElementById("total");
    zhujixunengMY.innerHTML=Number(totalxuNeng).toFixed(0);
    if(index<23){
        // var otherArr=window.localStorage.getItem("other");
        var bangongArr=window.localStorage.getItem("bangong");
        var zhaomingArr=window.localStorage.getItem("zhaoming");
        // var nuantongArr=window.localStorage.getItem("nuantong");
        var xiaofangArr=window.localStorage.getItem("xiaofang");
        var dimaiguanArr=window.localStorage.getItem("dimaiguan");
        var guangfuArr=window.localStorage.getItem("guangre");
        console.log("guangfuArr="+guangfuArr);//有
        var xunengArr=window.localStorage.getItem("xuneng");
        var rebengArr=window.localStorage.getItem("rebeng");//相当于主机直供
        var dianliangArr=window.localStorage.getItem("dianliang");
        var diannengArr=window.localStorage.getItem("dianneng");
        var guangfuArr2=window.localStorage.getItem("guangfu");
        var meetArr=window.localStorage.getItem("meet");
        var resArr=window.localStorage.getItem("res");
        var nuandianArr=window.localStorage.getItem("nuandian");

        // var xuqiuArr=window.localStorage.getItem("xuqiu");

        // var zhujixunengArr=window.localStorage.getItem("zhujixuneng");

        // var temArr=window.localStorage.getItem("tem");
        // var humArr=window.localStorage.getItem("hum");
        var guangfuArr3=guangfuArr2.split(",");
        var diannengArr1=diannengArr.split(",");
        var meetArr1=meetArr.split(",");
        var resArr1=resArr.split(",");
        var dianliangArr1=dianliangArr.split(",");
        var guangfuArr1=guangfuArr.split(",");
        // console.log("guangfuArr1"+guangfuArr1);//有
        var xunengArr1=xunengArr.split(",");
        var rebengArr1=rebengArr.split(",");
        var dimaiguanArr1=dimaiguanArr.split(",");
        var zhaomingArr1=zhaomingArr.split(",");
        var bangongArr1=bangongArr.split(",");
        // var otherArr1=otherArr.split(",");
        // var nuantongArr1=nuantongArr.split(",");
        var xiaofangArr1=xiaofangArr.split(",");
        var nuandianArr1=nuandianArr.split(",");
        // var temArr1=temArr.split(",");
        // var humArr1=humArr.split(",");

        var guangfu2Value=document.getElementById("guangfu");
        var dianneng1Value=document.getElementById("dianliang");
        var meet1Value=document.getElementById("meet1");
        var meet2Value=document.getElementById("meet2");
        var res1Value=document.getElementById("res1");
        var res2Value=document.getElementById("res2");
        var dianliang1Value=document.getElementById("dianliang");
        var guangfu1Value=document.getElementById("guangre");
        var xuneng1Value=document.getElementById("xuneng");
        var rebeng1Value=document.getElementById("rebeng");
        var dimaiguan1Value=document.getElementById("dimaiguan");
        // var other1Value=document.getElementById("other1");
        // var other2Value=document.getElementById("other2");
        var bangong1Value=document.getElementById("bangong1");
        var bangong2Value=document.getElementById("bangong2");
        var zhaoming1Value=document.getElementById("zhaoming1");
        var zhaoming2Value=document.getElementById("zhaoming2");
        var nuantong1Value=document.getElementById("nuantong1");
        var nuantong2Value=document.getElementById("nuantong2");
        var xiaofang1Value=document.getElementById("xiaofang1");
        var xiaofang2Value=document.getElementById("xiaofang2");
        var nuandian1Value=document.getElementById("nuandian");
        // var tem1Value=document.getElementById("tem");
        // var hum1Value=document.getElementById("hum");

        var nuandianValue=Number(nuandianArr1[index]);
        var guangfuValue4=Number(guangfuArr3[index]);
        var diannengValue=Number(diannengArr1[index]);
        var dianliangValue=Number(dianliangArr1[index]);
        var dianliangValue1=Number(dianliangArr1[index]*0.95);
        var guangfuValue=Number(guangfuArr1[index]);
        // console.log("光伏数据="+guangfuArr1[index]);
        var xunengValue=Number(xunengArr1[index]);
        var rebengValue=Number(rebengArr1[index]);
        var dimaiguanValue=Number(dimaiguanArr1[index]);
        // var otherValue= Number(otherArr1[index]);
        // var otherValue1=(Number(otherArr1[index])*0.95);
        var meetValue= Number(meetArr1[index]);
        var meetValue1= Number(meetArr1[index]*0.95);
        var resValue= Number(resArr1[index]);
        var resValue1= Number(resArr1[index]*0.95);
        var bangongValue=Number(bangongArr1[index]);
        var bangongValue1=Number(bangongArr1[index]*0.95);
        var zhaomingValue=Number(zhaomingArr1[index]);
        var zhaomingValue1=Number(zhaomingArr1[index]*0.95);
        // var nuantongValue=Number(nuantongArr1[index]);
        // var nuantongValue1=Number(nuantongArr1[index]*0.95);
        var xiaofangValue=Number(xiaofangArr1[index]);
        var xiaofangValue1=Number(xiaofangArr1[index]*0.95);
        // var temValue=Number(temArr1[index]);
        // var humValue=Number(humArr1[index]);
        //
        // tem1Value.innerHTML=Number(temValue).toFixed(0);
        // hum1Value.innerHTML=Number(humValue).toFixed(0);
        sumMeet1=sumMeet1+Number(meetValue);
        if(sumMeet1>0){
            $("#move11").css("animation","move12ball 8s linear infinite");
            $("#move011").css("animation","move12ball 8s linear infinite");
            $("#move011").css("animation-delay","4s");
        }
        sumMeet2=sumMeet2+Number(meetValue1);
        sumRes1=sumRes1+Number(resValue);
        if(sumRes1>0){
            $("#move13").css("animation","move14ball 8s linear infinite");
            $("#move013").css("animation","move14ball 8s linear infinite");
            $("#move013").css("animation-delay","4s");
        }
        sumRes2=sumRes2+Number(resValue1);
        sumGuangfu2=sumGuangfu2+Number(guangfuValue4);
        if(sumGuangfu2>0){
            $("#move1").css("animation","move2ball 8s linear infinite");
            $("#move01").css("animation","move2ball 8s linear infinite");
            $("#move01").css("animation-delay","4s");
        }
        sumDianneng1=sumDianneng1+Number(diannengValue);
        if(sumDianneng1>0){
            $("#move").css("animation","move1ball 8s linear infinite");
            $("#move00").css("animation","move1ball 8s linear infinite");
            $("#move00").css("animation-delay","4s");
        }
        sumNuandian1=sumNuandian1+Number(nuandianValue);
        if(sumNuandian1>0){
            $("#move4").css("animation","move5ball 8s linear infinite");
            $("#move04").css("animation","move5ball 8s linear infinite");
            $("#move04").css("animation-delay","4s");
        }
        sumDianliang1=sumDianliang1+Number(dianliangValue);
        if(sumDianliang1>0){
            $("#move3").css("animation","move4ball 8s linear infinite");
            $("#move03").css("animation","move4ball 8s linear infinite");
            $("#move03").css("animation-delay","4s");
        }
        sumDianliang2=sumDianliang2+Number(dianliangValue1);
        sumGuangfu1=sumGuangfu1+Number(guangfuValue); //光热
        if(sumGuangfu1>0){
            $("#move8").css("animation","move9ball 8s linear infinite");
            $("#move08").css("animation","move9ball 8s linear infinite");
            $("#move08").css("animation-delay","4s");
        }
        sumXuneng1=sumXuneng1+Number(xunengValue);
        if(sumXuneng1>0){
            $("#move6").css("animation","move7ball 8s linear infinite");
            $("#move06").css("animation","move7ball 8s linear infinite");
            $("#move06").css("animation-delay","4s");
        }
        sumRebeng1=sumRebeng1+Number(rebengValue);
        if(sumRebeng1>0){
            $("#move10").css("animation","move11ball 8s linear infinite");
            $("#move010").css("animation","move11ball 8s linear infinite");
            $("#move010").css("animation-delay","4s");
        }
        sumDimaiguan1=sumDimaiguan1+Number(dimaiguanValue);
        if(sumDimaiguan1>0){
            $("#move12").css("animation","move13ball 8s linear infinite");
            $("#move012").css("animation","move13ball 8s linear infinite");
            $("#move012").css("animation-delay","4s");
        }
        // sumOther1=sumOther1+Number(otherValue);
        // sumOther2=sumOther2+Number(otherValue1);
        sumBangong1=sumBangong1+Number(bangongValue);
        if(sumBangong1>0){
            $("#move2").css("animation","move3ball 8s linear infinite");
            $("#move02").css("animation","move3ball 8s linear infinite");
            $("#move02").css("animation-delay","4s");
        }
        sumBangong2=sumBangong2+Number(bangongValue1);
        sumZhaoming1=sumZhaoming1+Number(zhaomingValue);
        if(sumZhaoming1>0){
            $("#move5").css("animation","move6ball 8s linear infinite");
            $("#move05").css("animation","move6ball 8s linear infinite");
            $("#move05").css("animation-delay","4s");
        }
        sumZhaoming2=sumZhaoming2+Number(zhaomingValue1);
        // sumNuantong1=sumNuantong1+Number(nuantongValue);
        // sumNuantong2=sumNuantong2+Number(nuantongValue1);
        sumXiaofang1=sumXiaofang1+Number(xiaofangValue);
        if(sumXiaofang1>0){
            $("#move7").css("animation","move8ball 8s linear infinite");
            $("#move07").css("animation","move8ball 8s linear infinite");
            $("#move07").css("animation-delay","4s");
        }
        sumXiaofang2=sumXiaofang2+Number(xiaofangValue1);

        meet1Value.innerHTML=Number(sumMeet1).toFixed(0);
        meet2Value.innerHTML=Number(sumMeet2).toFixed(0);
        res1Value.innerHTML=Number(sumRes1).toFixed(0);
        res2Value.innerHTML=Number(sumRes2).toFixed(0);
        guangfu2Value.innerHTML=Number(sumGuangfu2).toFixed(0);
        dianneng1Value.innerHTML=Number(sumDianneng1).toFixed(0);
        // dianliang1Value.innerHTML=Number(sumDianliang1).toFixed(0);
        rebeng1Value.innerHTML=Number(sumRebeng1).toFixed(0);
        xuneng1Value.innerHTML=Number(sumXuneng1).toFixed(0);
        guangfu1Value.innerHTML=Number(sumGuangfu1).toFixed(0);
        dimaiguan1Value.innerHTML=Number(sumDimaiguan1).toFixed(0);
        bangong1Value.innerHTML=Number(sumBangong1).toFixed(0);
        bangong2Value.innerHTML=Number(sumBangong2).toFixed(0);
        // other1Value.innerHTML=Number(sumOther1).toFixed(0);
        // other2Value.innerHTML=Number(sumOther2).toFixed(0);
        zhaoming1Value.innerHTML=Number(sumZhaoming1).toFixed(0);
        zhaoming2Value.innerHTML=Number(sumZhaoming2).toFixed(0);
        nuantong1Value.innerHTML=Number(sumDianliang1).toFixed(0);
        nuantong2Value.innerHTML=Number(sumDianliang2).toFixed(0);
        xiaofang1Value.innerHTML=Number(sumXiaofang1).toFixed(0);
        xiaofang2Value.innerHTML=Number(sumXiaofang2).toFixed(0);
        nuandian1Value.innerHTML=Number(sumNuandian1).toFixed(0);

        var flag=localStorage.getItem("flag");
        if(flag=="1"){
             //夏季需求侧数据变化
            //夏季有湿度，也有温度
            // var airArr=window.localStorage.getItem("xinfengjizu");
            var xuqiuArr=window.localStorage.getItem("xuqiu");
            // var nuandianArr=window.localStorage.getItem("nuandian");
            var zhujixunengArr=window.localStorage.getItem("zhujixuneng");//相当于主机蓄能
            var temArr=window.localStorage.getItem("tem");
            var humArr=window.localStorage.getItem("hum");

            var xuqiuArr1=xuqiuArr.split(",");
            var zhujixunengArr1=zhujixunengArr.split(",");
            // var airArr1=airArr.split(",");
            // var nuandianArr1=nuandianArr.split(",");
            var temArr1=temArr.split(",");
            var humArr1=humArr.split(",");

            var xuqiuValue=Number(xuqiuArr1[index]);
            var zhujixunengValue=Number(zhujixunengArr1[index]);
            // var airValue=Number(airArr1[index]);
            // var nuandianValue=Number(nuandianArr1[index]);

            sumXuqiuS1=sumXuqiuS1+Number(xuqiuValue);
            if(sumXuqiuS1>0){
                $("#move9").css("animation","move10ball 8s linear infinite");
                $("#move09").css("animation","move10ball 8s linear infinite");
                $("#move09").css("animation-delay","4s");
            }
            sumXuqiuS2=sumXuqiuS2+Number(xuqiuValue)*0.95;
             sumZhujixuneng1=sumZhujixuneng1+Number(zhujixunengValue);
            // sumAir1=sumAir1+Number(airValue);
            // sumNuandian1=sumNuandian1+Number(nuandianValue);

             var zhujixuneng1Value=document.getElementById("zhujixuneng")
            var tem1Value=document.getElementById("tem");
            var hum1Value=document.getElementById("hum");
            var xuqiu1value=document.getElementById("xuqiu1");
            var xuqiu2value=document.getElementById("xuqiu2");
            // var air1Value=document.getElementById("air");
            // var nuandian1Value=document.getElementById("nuandian");
            var temValue=Number(temArr1[index]);
            var humValue=Number(humArr1[index]);

            xuqiu1value.innerHTML=Number(sumXuqiuS1).toFixed(0);
            xuqiu2value.innerHTML=Number(sumXuqiuS2).toFixed(0);
            zhujixuneng1Value.innerHTML=Number(sumZhujixuneng1).toFixed(0);
            // air1Value.innerHTML=Number(sumAir1).toFixed(0);
            // nuandian1Value.innerHTML=Number(sumNuandian1).toFixed(0);

            tem1Value.innerHTML=Number(temValue).toFixed(0);
            hum1Value.innerHTML=Number(humValue).toFixed(0);
        }
        if(flag=="0"){
            //冬季
            // 只有温度，没有湿度
            var temArr=window.localStorage.getItem("tem");
            var humArr=window.localStorage.getItem("hum");
            var xuqiuArr=window.localStorage.getItem("xuqiu");
            var zhujixunengArr=window.localStorage.getItem("zhujixuneng");

            var zhujixunengArr1=zhujixunengArr.split(",");
            var humArr1=humArr.split(",");
            var temArr1=temArr.split(",");
            var xuqiuArr1=xuqiuArr.split(",");

            var xuqiuValue=Number(xuqiuArr1[index]);
            var zhujixunengValue=Number(zhujixunengArr1[index]);
            sumXuqiuW1=sumXuqiuW1+Number(xuqiuValue);
            if(sumXuqiuW1>0){
                $("#move9").css("animation","move10ball 8s linear infinite");
                $("#move09").css("animation","move10ball 8s linear infinite");
                $("#move09").css("animation-delay","4s");
            }
            sumXuqiuW2=sumXuqiuW2+Number(xuqiuValue)*0.95;
            sumZhujixuneng1=sumZhujixuneng1+Number(zhujixunengValue);
            var tem1Value=document.getElementById("tem");
            var hum1Value=document.getElementById("hum");
            var xuqiu1value=document.getElementById("xuqiu1");
            var xuqiu2value=document.getElementById("xuqiu2");

            var zhujixuneng1Value=document.getElementById("zhujixuneng");

            var temValue=Number(temArr1[index]);
            var humValue=Number(humArr1[index]);

            zhujixuneng1Value.innerHTML=Number(sumZhujixuneng1).toFixed(0);
            xuqiu1value.innerHTML=Number(sumXuqiuW1).toFixed(0);
            xuqiu2value.innerHTML=Number(sumXuqiuW2).toFixed(0);
            hum1Value.innerHTML=Number(humValue).toFixed(0);
            tem1Value.innerHTML=Number(temValue).toFixed(0);
        }
        index=index+1;
    }

}
function startScoll(){
     tl1=setInterval("changeSpanValue()",958);
    // changeSpanValue();
}
function genDate1(){
    var myHour=document.getElementById("hour");
    var myMinute=document.getElementById("minute");
    var mySecond=document.getElementById("second");

    var hourArr=["01","02","03","04","05","06",
                 "07","08","09","10","11","12",
                 "13","14","15","16","17","18",
                 "19","20","21","22","23","23"];
    var minuteArr=[
         "03","06","09","12","15","18",
        "21","24","27","30","33","36",
        "39","05","09","11","15","03",
        "34","12","18","30","38","59"];

    var secondArr=[
        "02","03","06","07","08","09",
        "15","17","20","25","26","27",
        "35","36","38","40","42","43",
        "44","45","46","50","55","59"]
    if(index1<23){
        myHour.innerHTML=hourArr[index1];
        myMinute.innerHTML=minuteArr[index1];
        mySecond.innerHTML=secondArr[index1];
        index1=index1+1;
    }
    else{
        myHour.innerHTML="23";
        myMinute.innerHTML="59";
        mySecond.innerHTML="59";
    }
    // var date = new Date();
    // var yy = date.getFullYear();
    // if(yy<1900) yy = yy+1900;
    // var MM = date.getMonth()+1;
    // if(MM<10) MM = '0' + MM;
    // var dd = date.getDate();
    // if(dd<10) dd = '0' + dd;
    // var hh = date.getHours();
    // if(hh<10) hh = '0' + hh;
    // var mm = date.getMinutes();
    // if(mm<10) mm = '0' + mm;
    // var ss = date.getSeconds();
    // if(ss<10) ss = '0' + ss;
    // var ww = date.getDay();
    // if (ww==0) ww="星期日";
    // if (ww==1) ww="星期一";
    // if (ww==2) ww="星期二";
    // if (ww==3) ww="星期三";
    // if (ww==4) ww="星期四";
    // if (ww==5) ww="星期五";
    // if (ww==6) ww="星期六";
    // var str =  yy + "-" + MM + "-" + dd + " " + hh + ":" + mm + ":" + ss ;
    // console.log(str);
    // myTime.innerHTML=str;
    // myHour.innerHTML=hh;
    // myMinute.innerHTML=mm;
    // mySecond.innerHTML=ss;
    // hourNow=date.getHours();

    //         //拼接时间
    //         var dateStr = date.getFullYear()+"年"+(date.getMonth()+1)+"月"+date.getDate()+"日&nbsp;&nbsp"
    //             date.getHours()+"时"+date.getMinutes()+"分"+date.getSeconds()+"秒";
    //
    //         //2.获取span标签对象
    //         var spanTip = document.getElementById("timeNow");
    //
    //         // 3.设置span标签对象的innerHTML属性
    //         spanTip.innerHTML = dateStr;
}
function stopDraw() {
    var myHour=document.getElementById("hour");
    var myMinute=document.getElementById("minute");
    var mySecond=document.getElementById("second");
    // myHour.innerHTML="00";
    // myMinute.innerHTML="00";
    // mySecond.innerHTML="00";
    window.clearInterval(tl);
    window.clearInterval(tl1);
    // hourNow='0';
    dataNow=[];
    option2.series[1].data=[];
    option3.series[0].data=[];
    option4.series[0].data=[];
    option5.series[0].data=[];
    if (myChart != null && myChart != "" && myChart != undefined) {
        myChart.dispose();
    }
    if (myChart2 != null && myChart2 != "" && myChart2 != undefined) {
        myChart2.dispose();
    }
    if (myChart3 != null && myChart3 != "" && myChart3 != undefined) {
        myChart3.dispose();
    }
    if (myChart4 != null && myChart4 != "" && myChart4 != undefined) {
        myChart4.dispose();
    }
    // index=0;
    // index1=0;
    //  sumBangong1=0;
    //  sumBangong2=0;
    //  sumZhaoming1=0;
    //  sumZhaoming2=0;
    //  sumNuantong1=0;
    //  sumNuantong2=0;
    //  sumXiaofang1=0;
    //  sumXiaofang2=0;
    //  sumDianliang1=0;
    //  sumGuangfu1=0;
    //  sumGuangfu2=0;
    //  sumXuneng1=0;
    //  sumRebeng1=0;
    //  sumDimaiguan1=0;
    //  sumAir1=0;
    //  sumDianliang2=0;
    //  sumDianneng1=0;
    //  sumNuandian1=0;
    //  sumZhujixuneng1=0;
    //  sumXuqiuW1=0;
    //  sumXuqiuW2=0;
    //  sumXuqiuS1=0;
    //  sumXuqiuS2=0;
    //  sumMeet1=0;
    //  sumMeet2=0;
    //  sumRes1=0;
    //  sumRes2=0;

    myChart= echarts.init(document.getElementById('lineChart'));
    myChart.setOption(option1);
    myChart2= echarts.init(document.getElementById('lineChart2'));
    myChart2.setOption(option3);
    myChart3= echarts.init(document.getElementById('lineChart3'));
    myChart3.setOption(option4);
    myChart4= echarts.init(document.getElementById('lineChart4'));
    myChart4.setOption(option5);

}

$("#button").bind('click',function(){
    if( $("#button")[0].checked==false){
        stopDraw();
        $("#move").css("animation","none");
        $("#move00").css("animation","none");

        $("#move1").css("animation","none");
        $("#move01").css("animation","none");

        $("#move2").css("animation","none");
        $("#move02").css("animation","none");

        $("#move3").css("animation","none");
        $("#move03").css("animation","none");

        $("#move4").css("animation","none");
        $("#move04").css("animation","none");

        $("#move5").css("animation","none");
        $("#move05").css("animation","none");

        $("#move6").css("animation","none")
        $("#move06").css("animation","none");

        $("#move7").css("animation","none");
        $("#move07").css("animation","none");

        $("#move8").css("animation","none");
        $("#move08").css("animation","none");

        $("#move9").css("animation","none");
        $("#move09").css("animation","none");

        $("#move10").css("animation","none");
        $("#move010").css("animation","none");

        $("#move11").css("animation","none");
        $("#move011").css("animation","none");

        $("#move12").css("animation","none");
        $("#move012").css("animation","none");

        $("#move13").css("animation","none");
        $("#move013").css("animation","none");

    }
    if( $("#button")[0].checked==true){
        draw1();
        // $("#move").css("animation","move1ball 8s linear infinite");
        // $("#move00").css("animation","move1ball 8s linear infinite");
        // $("#move00").css("animation-delay","4s");
        //
        //
        // $("#move1").css("animation","move2ball 8s linear infinite");
        // $("#move01").css("animation","move2ball 8s linear infinite");
        // $("#move01").css("animation-delay","4s");
        //
        // $("#move2").css("animation","move3ball 8s linear infinite");
        // $("#move02").css("animation","move3ball 8s linear infinite");
        // $("#move02").css("animation-delay","4s");
        //
        // $("#move3").css("animation","move4ball 8s linear infinite");
        // $("#move03").css("animation","move4ball 8s linear infinite");
        // $("#move03").css("animation-delay","4s");
        //
        // $("#move4").css("animation","move5ball 8s linear infinite");
        // $("#move04").css("animation","move5ball 8s linear infinite");
        // $("#move04").css("animation-delay","4s");
        //
        // $("#move5").css("animation","move6ball 8s linear infinite");
        // $("#move05").css("animation","move6ball 8s linear infinite");
        // $("#move05").css("animation-delay","4s");
        //
        // $("#move6").css("animation","move7ball 8s linear infinite");
        // $("#move06").css("animation","move7ball 8s linear infinite");
        // $("#move06").css("animation-delay","4s");
        //
        // $("#move7").css("animation","move8ball 8s linear infinite");
        // $("#move07").css("animation","move8ball 8s linear infinite");
        // $("#move07").css("animation-delay","4s");
        //
        // $("#move8").css("animation","move9ball 8s linear infinite");
        // $("#move08").css("animation","move9ball 8s linear infinite");
        // $("#move08").css("animation-delay","4s");
        //
        // $("#move9").css("animation","move10ball 8s linear infinite");
        // $("#move09").css("animation","move10ball 8s linear infinite");
        // $("#move09").css("animation-delay","4s");
        //
        // $("#move10").css("animation","move11ball 8s linear infinite");
        // $("#move010").css("animation","move11ball 8s linear infinite");
        // $("#move010").css("animation-delay","4s");
        //
        // // $("#move11").css("animation","move12ball 8s linear infinite");
        // // $("#move011").css("animation","move12ball 8s linear infinite");
        // // $("#move011").css("animation-delay","4s");
        //
        // $("#move12").css("animation","move13ball 8s linear infinite");
        // $("#move012").css("animation","move13ball 8s linear infinite");
        // $("#move012").css("animation-delay","4s");
        //
        // $("#move13").css("animation","move14ball 8s linear infinite");
        // $("#move013").css("animation","move14ball 8s linear infinite");
        // $("#move013").css("animation-delay","4s");


    }
});

function timeStart(){
    $("#start").attr({"disabled":"disabled"});
    $("#stop").removeAttr("disabled");
    // genDate1();//先绘制一次，否则先调用setinterval会使浏览器有一秒钟的空白
    tl =setInterval("genDate1()",1000);//调用计时器
    startScoll();
    myChart2.dispatchAction({
        type: 'timelinePlayChange', //切换时间轴的播放状态。
        playState: true            // 播放状态，true 为自动播放
    });
    myChart3.dispatchAction({
        type: 'timelinePlayChange', //切换时间轴的播放状态。
        playState: true            // 播放状态，true 为自动播放
    });
    myChart4.dispatchAction({
        type: 'timelinePlayChange', //切换时间轴的播放状态。
        playState: true            // 播放状态，true 为自动播放
    });
    myChart.dispatchAction({
        type: 'timelinePlayChange', //切换时间轴的播放状态。
        playState: true            // 播放状态，true 为自动播放
    });
}
function animateStop(){
    $("#move").css("animation-play-state","paused");
    $("#move00").css("animation-play-state","paused");


    $("#move1").css("animation-play-state","paused");
    $("#move01").css("animation-play-state","paused");

    $("#move2").css("animation-play-state","paused");
    $("#move02").css("animation-play-state","paused");

    $("#move3").css("animation-play-state","paused");
    $("#move03").css("animation-play-state","paused");

    $("#move4").css("animation-play-state","paused");
    $("#move04").css("animation-play-state","paused");

    $("#move5").css("animation-play-state","paused");
    $("#move05").css("animation-play-state","paused");

    $("#move6").css("animation-play-state","paused");
    $("#move06").css("animation-play-state","paused");

    $("#move7").css("animation-play-state","paused");
    $("#move07").css("animation-play-state","paused");

    $("#move8").css("animation-play-state","paused");
    $("#move08").css("animation-play-state","paused");

    $("#move9").css("animation-play-state","paused");
    $("#move09").css("animation-play-state","paused");

    $("#move10").css("animation-play-state","paused");
    $("#move010").css("animation-play-state","paused");

    $("#move11").css("animation-play-state","paused");
    $("#move011").css("animation-play-state","paused");

    $("#move12").css("animation-play-state","paused");
    $("#move012").css("animation-play-state","paused");

    $("#move13").css("animation-play-state","paused");
    $("#move013").css("animation-play-state","paused");
}
function timeStop(){
    $("#stop").attr({"disabled":"disabled"});
    $("#start").removeAttr("disabled");
    window.clearInterval(tl);
    window.clearInterval(tl1);
    animateStop();
    myChart2.dispatchAction({
        type: 'timelinePlayChange', //切换时间轴的播放状态。
        playState: false            // 播放状态，true 为自动播放
    });
    myChart3.dispatchAction({
        type: 'timelinePlayChange', //切换时间轴的播放状态。
        playState: false            // 播放状态，true 为自动播放
    });
    myChart4.dispatchAction({
        type: 'timelinePlayChange', //切换时间轴的播放状态。
        playState: false            // 播放状态，true 为自动播放
    });
    myChart.dispatchAction({
        type: 'timelinePlayChange', //切换时间轴的播放状态。
        playState: false            // 播放状态，true 为自动播放
    });
}
function timeReset(){
    location.reload();
}

window.onresize = function (){
    myChart.resize();
    myChart2.resize();
    myChart3.resize();
    myChart4.resize();
}